/*****************************************************************************
 *   Copyright (C) 2008 John Schember <john@nachtimwald.com>                 *
 *                                                                           *
 *   This file is part of niwbillmanager.                                    *
 *                                                                           *
 *   niwbillmanager is free software: you can redistribute it and/or         *
 *   modify it under the terms of the GNU General Public License as          *
 *   published by the Free Software Foundation, either version 3 of the      *
 *   License, or (at your option) any later version.                         *
 *                                                                           *
 *   niwbillmanager is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
 *   GNU General Public License for more details.                            *
 *                                                                           *
 *   You should have received a copy of the GNU General Public License       *
 *   along with niwbillmanager. If not, see                                  *
 *   <http://www.gnu.org/licenses/>.                                         *
 *****************************************************************************/

#ifndef QT4UIPLUGININTERFACE_H
#define QT4UIPLUGININTERFACE_H

#include <QAction>
#include <QObject>

#include <niwbillmanager.h>

class Qt4UiPluginInterface : public QObject
{
    public:
        virtual ~Qt4UiPluginInterface() {};

        /**
         * Sets a reference to the lib so that the plugin can access and modify
         * bills.
         * This must be called before all other functions.
         * @param *lib A reference to the lib.
         */
        virtual void setLib(NiwBillManager *lib=0) = 0;
        virtual QAction *getAction() = 0;
        virtual QString getName() = 0;
        virtual QString getCredits() = 0;
        virtual QString getDescription() = 0;
        virtual QString getVersion() = 0;
        virtual QString getLicense() = 0;
        virtual bool canConfig() = 0;
        virtual void execConfigDialog() = 0;

    signals:
        virtual void uiUpdate() = 0;
        virtual void billItemsChange() = 0;
        virtual void tagsChange() = 0;
        virtual void undoRedoUpdate() = 0;

    public slots:
        virtual void on_actionRun_triggered() = 0;
};

Q_DECLARE_INTERFACE(Qt4UiPluginInterface,
    "com.nachtimwald.projects.niwbillmanager.Qt4UiPluginInterface/1.1")

#endif /* QT4UIPLUGININTERFACE_H */
